package com.wxit.minio.demo;

import io.minio.DownloadObjectArgs;
import io.minio.MinioClient;
import lombok.val;

public class DownLoadDemo {
    public static void main(String[] args) throws Exception{
        val minioClient = MinioClient.builder()
                .endpoint("http://172.30.0.171:9000")
                .credentials("admin", "12345678")
                .build();

        minioClient.downloadObject(
                DownloadObjectArgs.builder()
                        .bucket("xiaohao")
                        .object("155上已使用的IP.md")
                        .filename("155上已使用的IP.md")
                        .build()

        );
        System.out.println("下载成功");
    }
}
